import React, { Component } from 'react'
import Far from './Far'
import Registe from './Registe'
import Login from './Login'

export default class App extends Component {
  render() {
    return (
      <div>
        {/* 在组件的子节点写的内容,其实也是在传递props数据. 如果是写在子节点的props属性,获取时,固定的属性名叫做children */}
        <Far>{(state, handle) => <Registe {...state} handle={handle} />}</Far>
        <Far>{(state, handle) => <Login {...state} handle={handle} />}</Far>
      </div>
    )
  }
}
